using System;
using System.ComponentModel;
using System.Runtime.Serialization;

namespace WcfService1.DTO
{
    [DataContract]
    public class CustomerDTO : INotifyPropertyChanged
    {
        private String _Address;
        private String _City;
        private CoaDTO _Coa;
        private String _ContactPerson;
        private String _Country;
        private String _CustomerId;


        private String _CustomerName;
        private String _Email;
        private String _Fax;
        private int _No;
        private String _PostalCode;
        private String _Telp;
        private String _created_by;
        private DateTime? _created_date;
        private String _modified_by;
        private DateTime? _modified_date;

        [DataMember]
        public String CustomerId
        {
            get { return _CustomerId; }
            set
            {
                _CustomerId = value;
                RaisePropertyChanged("CustomerId");
            }
        }

        [DataMember]
        public String CustomerName
        {
            get { return _CustomerName; }
            set
            {
                _CustomerName = value;
                RaisePropertyChanged("CustomerName");
            }
        }


        [DataMember]
        public String Address
        {
            get { return _Address; }
            set
            {
                _Address = value;
                RaisePropertyChanged("Address");
            }
        }


        [DataMember]
        public String City
        {
            get { return _City; }
            set
            {
                _City = value;
                RaisePropertyChanged("City");
            }
        }


        [DataMember]
        public String PostalCode
        {
            get { return _PostalCode; }
            set
            {
                _PostalCode = value;
                RaisePropertyChanged("PostalCode");
            }
        }


        [DataMember]
        public String Country
        {
            get { return _Country; }
            set
            {
                _Country = value;
                RaisePropertyChanged("Country");
            }
        }


        [DataMember]
        public String Telp
        {
            get { return _Telp; }
            set
            {
                _Telp = value;
                RaisePropertyChanged("Telp");
            }
        }


        [DataMember]
        public String Fax
        {
            get { return _Fax; }
            set
            {
                _Fax = value;
                RaisePropertyChanged("Fax");
            }
        }


        [DataMember]
        public String Email
        {
            get { return _Email; }
            set
            {
                _Email = value;
                RaisePropertyChanged("Email");
            }
        }


        [DataMember]
        public String ContactPerson
        {
            get { return _ContactPerson; }
            set
            {
                _ContactPerson = value;
                RaisePropertyChanged("ContactPerson");
            }
        }


        [DataMember]
        public CoaDTO Coa
        {
            get { return _Coa; }
            set
            {
                _Coa = value;
                RaisePropertyChanged("Coa");
            }
        }


        [DataMember]
        public String created_by
        {
            get { return _created_by; }
            set
            {
                _created_by = value;
                RaisePropertyChanged("created_by");
            }
        }


        [DataMember]
        public DateTime? created_date
        {
            get { return _created_date; }
            set
            {
                _created_date = value;
                RaisePropertyChanged("created_date");
            }
        }

        [DataMember]
        public String modified_by
        {
            get { return _modified_by; }
            set
            {
                _modified_by = value;
                RaisePropertyChanged("modified_by");
            }
        }


        [DataMember]
        public DateTime? modified_date
        {
            get { return _modified_date; }
            set
            {
                _modified_date = value;
                RaisePropertyChanged("modified_date");
            }
        }

        public int No
        {
            get { return _No; }
            set
            {
                _No = value;
                RaisePropertyChanged("No");
            }
        }

        #region INotifyPropertyChanged Members

        public event PropertyChangedEventHandler PropertyChanged;

        #endregion

        protected void RaisePropertyChanged(string propertyname)
        {
            PropertyChangedEventHandler handler = PropertyChanged;
            if (handler != null)
                handler(this, new PropertyChangedEventArgs(propertyname));
        }

        public override string ToString()
        {
            return this.CustomerName;
        }
    }
}